<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>同心正方形</title>
</head>
<body>
    <div id="container">
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </div>
    <style>
        body{
            background: black;
        }
        #container{
            position: relative;
            width: 500px;
            height: 500px;
        }
        #container div{
            position: absolute;
            border-width: 2em;
            border-style: solid;
            border-color: red yellow;
        }
        #container div:nth-child(1)
        {

            width: 25em;
            height: 25em;
        }
        #container div:nth-child(2)
        {
            left: 2.5em;
            top: 2.5em;
            width: 20em;
            height: 20em;
        }
        #container div:nth-child(3)
        {
            left: 5em;
            top: 5em;
            width: 15em;
            height: 15em;
        }
        #container div:nth-child(4)
        {
            left: 7.5em;
            top: 7.5em;
            width: 10em;
            height: 10em;
        }
        #container div:nth-child(5)
        {
            left: 10em;
            top: 10em;
            width: 5em;
            height: 5em;
        }
    </style>
</body>
</html>